import Config from '../../config/config'
import { DefaultDataModel } from '../../model/index'

function ecologyServices(req, res) {
  const resData = DefaultDataModel({
		"options": [{
			"label": "生活服务",
			"value": "生活服务",
			"children": [{
				"label": "天气提醒",
				"value": "3",
				"children": null
			}, {
				"label": "恶劣天气提醒",
				"value": "4",
				"children": null
			}]
		}],
		"services": [{
			"id": "3",
			"name": "天气提醒",
			"identifier": "c",
			"templateList": [{
				"id": 100,
				"name": "文字类模板",
				"imageUrl": "https://www.galaxyautotech.com/building-2.jpg",
				"title": {
					"content": "这里显示标题",
					"isRequired": 1,
					"isDisplay": 1
				},
				"subTitle": {
					"content": "这里显示副标题",
					"isRequired": 1,
					"isDisplay": 1
				},
				"rightButton": {
					"content": "确认",
					"isRequired": 1,
					"isDisplay": 1
				},
				"leftButton": {
					"content": "取消",
					"isRequired": 1,
					"isDisplay": 1
				},
				"outputContents": [{
					"content": "今天天气良好，当前温度是#temp",
					"outputId": 1
				}],
				"brocast": {
					"brocastSwitch": 1,
					"brocastContent": "今天天气良好，适合外出"
				}
			}],
			"inputs": null
		}, {
			"id": "4",
			"name": "恶劣天气提醒",
			"identifier": "d",
			"templateList": [{
				"id": 200,
				"name": "文字类模板",
				"imageUrl": "https://www.galaxyautotech.com/building-2.jpg",
				"title": {
					"content": "这里显示标题",
					"isRequired": 1,
					"isDisplay": 1
				},
				"subTitle": {
					"content": "这里显示副标题",
					"isRequired": 1,
					"isDisplay": 1
				},
				"rightButton": {
					"content": "确认",
					"isRequired": 1,
					"isDisplay": 1
				},
				"leftButton": {
					"content": "取消",
					"isRequired": 1,
					"isDisplay": 1
				},
				"outputContents": [{
					"content": "今天天气恶劣，当前温度是#temp",
					"outputId": 1
				}],
				"brocast": {
					"brocastSwitch": 1,
					"brocastContent": "今天天气恶劣，外出请注意安全"
				}
			}],
			"inputs": null
		}]
	})
  res.json(resData)
}

const ResponseList = [
  {
    path: `${Config.baseURL}/api/object/ecologyServices`,
    method: 'get',
    fun: ecologyServices,
  }
]

export default ResponseList
